﻿namespace Morus
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Linq;

    public static class EnumerableExtension
    {
        [DebuggerStepThrough]
        public static void ForEach<T>(this IEnumerable<T> target, Action<T> action)
        {
            foreach (T item in target)
            {
                action(item);
            }
        }

        [DebuggerStepThrough]
        public static bool IsEmpty<T>(this IEnumerable<T> target)
        {
            return !target.Any();
        }
    }
}
